package com.simtop.dao;

import com.simtop.pojo.Ud;
import com.simtop.pojo.Uds;
import com.simtop.pojo.experiment.Experiment;
import com.simtop.pojo.experiment.ExperimentDynamicVo;
import com.simtop.pojo.experiment.ExperimentReportVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author lvyongwei
 */
@Mapper
public interface ExperimentMapper {

    /**
     * 添加实验报告
     * @param experiment
     * @return
     */
    public boolean insertExperiment(Experiment experiment);

    /**
     * 修改实验报告
     * @param experiment
     * @return
     */
    public boolean updateExperiment(Experiment experiment);

    /**
     * 作品动态列表
     * @param message 关键字
     * @return
     */
    public List<ExperimentDynamicVo> getAllDynamic(String message);

    /**
     * 实验报告列表
     * @param userId
     * @param message 关键字
     * @return
     */
    public List<ExperimentReportVo> getAllReport(@Param("userId") Integer userId, @Param("message") String message);

    /**
     * 点赞和取消点赞使用的是redis，因此此处无用
     */
    /**
     * 点赞
     * @param userId
     * @param experimentId
     * @return
     */
    public boolean giveLike(@Param("userId")Integer userId,@Param("experimentId")Long experimentId);

    /**
     * 取消点赞
     * @param userId
     * @param experimentId
     * @return
     */
    public boolean unGiveLike(@Param("userId")Integer userId,@Param("experimentId")Long experimentId);

    /**
     * 删除实验报告
     * @param experimentId
     * @return
     */
    public boolean delete(Long experimentId);

    void addud(@Param("id") int id, @Param("username") String username, @Param("one0") Object one0, @Param("oneformat1") String oneformat1, @Param("oneformat2") String oneformat2, @Param("one3") Object one3, @Param("one4") Object one4,
               @Param("two0") Object two0, @Param("twoformat1") String twoformat1, @Param("twoformat2") String twoformat2, @Param("two3") Object two3, @Param("two4") Object two4,
               @Param("three0") Object three0,@Param("threeformat1") String threeformat1,@Param("threeformat2") String threeformat2,@Param("three3") Object three3,@Param("three4") Object three4,
               @Param("for0") Object for0, @Param("forformat1") String forformat1,@Param("forformat2") String forformat2, @Param("for3") Object for3,@Param("for4") Object for4,
               @Param("five0") Object five0, @Param("fiveformat1") String fiveformat1,@Param("fiveformat2") String fiveformat2, @Param("five3") Object five3, @Param("five4") Object five4,
               @Param("six0") Object six0, @Param("sixformat1") String sixformat1,@Param("sixformat2") String sixformat2, @Param("six3") Object six3, @Param("six4") Object six4,
               @Param("seven0") Object seven0, @Param("sevenformat1") String sevenformat1,@Param("sevenformat2") String sevenformat2, @Param("seven3") Object seven3, @Param("seven4") Object seven4,
               @Param("eight0") Object eight0, @Param("eightformat1") String eightformat1, @Param("eightformat2") String eightformat2, @Param("eight3") Object eight3, @Param("eight4") Object eight4,
               @Param("nine0") Object nine0,@Param("nineformat1") String nineformat1, @Param("nineformat2") String nineformat2, @Param("nine3") Object nine3, @Param("nine4") Object nine4,
               @Param("ten0") Object ten0,@Param("tenformat1") String tenformat1, @Param("tenformat2") String tenformat2, @Param("ten3") Object ten3, @Param("ten4") Object ten4,
               @Param("eleve0") Object eleve0,@Param("eleveformat1") String eleveformat1, @Param("eleveformat2") String eleveformat2, @Param("eleve3") Object eleve3, @Param("eleve4") Object eleve4,
               @Param("twelve0") Object twelve0,@Param("twelveformat1") String twelveformat1, @Param("twelveformat2") String twelveformat2, @Param("twelve3") Object twelve3, @Param("twelve4") Object twelve4,
               @Param("thirteen0") Object thirteen0,@Param("thirteenformat1") String thirteenformat1, @Param("thirteenformat2") String thirteenformat2, @Param("thirteen3") Object thirteen3, @Param("thirteen4") Object thirteen4,
               @Param("fourteen0") Object fourteen0,@Param("fourteenformat1") String fourteenformat1, @Param("fourteenformat2") String fourteenformat2, @Param("fourteen3") Object fourteen3, @Param("fourteen4") Object fourteen4,
               @Param("fifteen0") Object fifteen0,@Param("fifteenformat1") String fifteenformat1, @Param("fifteenformat2") String fifteenformat2, @Param("fifteen3") Object fifteen3, @Param("fifteen4") Object fifteen4,
               @Param("sixteen0") Object sixteen0,@Param("sixteenformat1") String sixteenformat1, @Param("sixteenformat2") String sixteenformat2, @Param("sixteen3") Object sixteen3, @Param("sixteen4") Object sixteen4,
               @Param("seventeen0") Object seventeen0,@Param("seventeenformat1") String seventeenformat1, @Param("seventeenformat2") String seventeenformat2, @Param("seventeen3") Object seventeen3, @Param("seventeen4") Object seventeen4,
               @Param("eighteen0") Object eighteen0,@Param("eighteenformat1") String eighteenformat1, @Param("eighteenformat2") String eighteenformat2, @Param("eighteen3") Object eighteen3, @Param("eighteen4") Object eighteen4,
               @Param("nineteen0") Object nineteen0,@Param("nineteenformat1") String nineteenformat1, @Param("nineteenformat2") String nineteenformat2, @Param("nineteen3") Object nineteen3, @Param("nineteen4") Object nineteen4,
               @Param("twenty0") Object twenty0,@Param("twentyformat1") String twentyformat1, @Param("twentyformat2") String twentyformat2, @Param("twenty3") Object twenty3, @Param("twenty4") Object twenty4,
               @Param("last0") Object last0,@Param("lastformat1") String lastformat1,@Param("lastformat2") String lastformat2,@Param("last3") Object last3, @Param("last4") Object last4




    );

    List<Ud> allsy(@Param("userid") int userid);

    List<Ud> allallsy();

    void addu3d02(@Param("id") int id, @Param("username") String username, @Param("data") String data, @Param("formatdata") String formatdata);

    List<Uds> allsy2(@Param("userid") int userid);

    List<Uds> allallsy02();

    void deleteExperimental(@Param("udId") int udId);
}
